package com.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;


/**
 * 领养宠物 表定义层。
 *
 * @author admin
 * @since 2024-06-17
 */
public class LingyangTableDef extends TableDef {

    private static final long serialVersionUID = 1L;

    /**
     * 领养宠物
     */
    public static final LingyangTableDef LINGYANG = new LingyangTableDef();

    
    public final QueryColumn ID = new QueryColumn(this, "id");

    
    public final QueryColumn IMG = new QueryColumn(this, "img");

    
    public final QueryColumn TEXT = new QueryColumn(this, "text");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, IMG, TEXT};

    public LingyangTableDef() {
        super("", "lingyang");
    }

    private LingyangTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public LingyangTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new LingyangTableDef("", "lingyang", alias));
    }

}
